/****** Object:  Table [dbo].[flightSeat]    ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[flightSeat](
	[flightSeatId] [int] IDENTITY(1,1) NOT NULL,
	[flightScheduleId] [int] NULL,
	[seatTypeCode] [nchar](10) NULL,
	[seatNo] [nchar](10) NULL,
	[seatRow] [int] NULL,
	[seatColumn] [nchar](2) NULL,
	[isWindowSeat] [bit] NULL,
	[isAisleSeat] [bit] NULL,
	[status] [nchar](10) NULL,
 CONSTRAINT [PK_flightSeat] PRIMARY KEY CLUSTERED 
(
	[flightSeatId] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

ALTER TABLE [dbo].[flightSeat]  WITH CHECK ADD  CONSTRAINT [FK_flightSeat_flightSchedule] FOREIGN KEY([flightScheduleId])
REFERENCES [dbo].[flightSchedule] ([flightScheduleId])
GO

ALTER TABLE [dbo].[flightSeat] CHECK CONSTRAINT [FK_flightSeat_flightSchedule]
GO

ALTER TABLE [dbo].[flightSeat]  WITH CHECK ADD  CONSTRAINT [FK_flightSeat_seatType] FOREIGN KEY([seatTypeCode])
REFERENCES [dbo].[seatType] ([seatTypeCode])
GO

ALTER TABLE [dbo].[flightSeat] CHECK CONSTRAINT [FK_flightSeat_seatType]
GO

